const moment = require('moment');
exports.relativeTime = time => moment(new Date(time * 1000)).fromNow();
exports.format_datanum=(time,type)=>{
	var t='';
	if(time){
		var u=new Date(Number(time));
		t=moment(u).format(type || 'YYYY-MM-DD hh:mm:ss')
	}
	return t;
	
}
